docs(scripted_tool): shared context and state patterns#530
Merged
Conversation
Document the closure-capture pattern with Arc/Arc<Mutex<T>> for sharing resources across tool callbacks (issue #522, Option C). Document the LLM-as-state-carrier pattern for cross-execute() state (issue #524, Option D). Add tests verifying fresh interpreter isolation and Arc callback persistence across execute() calls. 4 new tests. Update spec 014. Closes #522 Closes #524
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Arc/Arc<Mutex<T>>for sharing resources across tool callbacks (feat(scripted_tool): shared context across tool callbacks #522, Option C)execute()calls (feat(scripted_tool): optional persistent state across execute() calls #524, Option D)Test plan
cargo test --lib scripted_tool— passcargo fmt --check— cleancargo clippy --all-targets --all-features -- -D warnings— cleanCloses #522
Closes #524